package com.chen.blue.domain.dto.system;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * Created By CLT On 2024/4/27.
 */
@SuppressWarnings("all")
@Getter
@Setter
@ApiModel("角色添加参数")
public class RoleDto implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 角色名称
     */
    @Length(max = 30, message = "角色名称长度不能超过30")
    @NotBlank
    @ApiModelProperty(value = "角色名称", required = true)
    private String name;

    /**
     * 角色权限字符串
     */
    @Length(max = 100, message = "角色权限字符串长度不能超过100")
    @NotBlank
    @ApiModelProperty(value = "角色权限字符串", required = true)
    private String code;

    /**
     * 菜单权限ID
     */
    @ApiModelProperty(value = "菜单权限")
    private List<Long> menuIds;

    /**
     * 显示顺序
     */
    @NotNull
    @ApiModelProperty(value = "显示顺序", required = true)
    private Integer sort;

    /**
     * 角色类型(1内置 2自定义)
     */
    @JsonIgnore
    @ApiModelProperty(value = "角色类型(1内置 2自定义)", required = true)
    private Integer type;

    /**
     * 角色状态（0停用 1正常）
     */
    @NotNull
    @ApiModelProperty(value = "角色状态（0停用 1正常）", required = true)
    private Boolean status;

    /**
     * 备注
     */
    @Length(max = 500, message = "备注长度不能超过500")
    @ApiModelProperty(value = "备注")
    private String remark;


}
